﻿@*统一列表模板*@
<table class="listTitle">
    <tr>
        <td width="15">
            <img alt="" src="/images/filesave.png" />
        </td>
        <td width="300">
            @{
                var panelTitle = ViewData["PanelTitle"] == null ? "列表" : ViewData["PanelTitle"].ToString();
                @panelTitle
            }
        </td>
        <td align="right">
            @{
                var showAddButton = ViewData["ShowAddButton"] == null ? false : (bool)ViewData["ShowAddButton"];
                if (showAddButton == true)
                {
                <input id="btnAdd" type="button" value=" 新 增 " class="button" onclick="btnAdd_Click()" />
                }
                var showDeleteButton = ViewData["ShowDeleteButton"] == null ? false : (bool)ViewData["ShowDeleteButton"];
                if (showDeleteButton == true)
                {
                <input id="btnDelete" type="button" value=" 删 除 " class="button" onclick="btnDelete_Click()" />
                }
                var showOtherButton = ViewData["ShowOtherButton"] == null ? false : (bool)ViewData["ShowOtherButton"];
                if (showOtherButton == true)
                {
                    var otherButtonID = ViewData["OtherButtonID"] == null ? "otherButton" : ViewData["OtherButtonID"].ToString();
                    var otherButtonValue = ViewData["OtherButtonValue"] == null ? "其他按钮" : ViewData["OtherButtonValue"].ToString();
                    var otherButtonClick = ViewData["OtherButtonClick"] == null ? "javascript:void(0)" : ViewData["OtherButtonClick"].ToString();
                <input id="@otherButtonID" type="button" value="@otherButtonValue" class="button" onclick="@otherButtonClick" />
                }

                var showBackButton = ViewData["ShowBackButton"] == null ? false : (bool)ViewData["ShowBackButton"];
                if (showBackButton == true)
                {
                <input id="btnBack" type="button" value=" 返 回 " class="button" onclick="btnBack_Click()" />
                }
                var showCloseButton = ViewData["ShowCloseButton"] == null ? false : (bool)ViewData["ShowCloseButton"];
                if (showCloseButton == true)
                {
                <input id="btnClose" type="button" value=" 关 闭 " class="button" onclick="btnClose_Click()" />
                }
               
            }
        </td>
    </tr>
</table>
@{
    var gridID = ViewData["GridID"] == null ? "DataGrid" : ViewData["GridID"].ToString();
    <table id="@gridID" class="pagTable" cellpadding="0" cellspacing="0">
    </table>
}
<div>
    @{
        var showPager = ViewData["ShowPager"] == null ? true : (bool)ViewData["ShowPager"];
        if (showPager == true)
        {
        <div id="Pagination" class="pagination">
        </div>
        }
    }
    @{
        var showLoading = ViewData["ShowLoading"] == null ? true : (bool)ViewData["ShowLoading"];
        if (showLoading == true)
        {
        <div id="loading" class="loading">
            <img src="/Images/tree_loading.gif" alt="正在加载中..." />
        </div>
        }
    }
</div>
<div id="msg">
</div>
